import fetch from 'common/src/utils/fetch'


/**
 * 期中退课白名单已开放课程列表
 */
export function getCourses(data) {
    return fetch({
        url: '/api/electionservice/medRuleRef/list',
        method: 'post',
        data: data
    });
}


/**
 * 添加
 */
export function addCourse(data) {
    return fetch({
        url: '/api/electionservice/medRuleRef/add',
        method: 'post',
        data: data
    });
}

export function addStatus(key) {
    return fetch({
        url: '/api/electionservice/medRuleRef/findAddAll?key='+key,
        method: 'get'
    });
}
/**
 * 全量添加
 */
export function addAllCourse(data) {
    return fetch({
        url: '/api/electionservice/medRuleRef/addAll',
        method: 'post',
        data: data
    });
}

/**
 * 初始化数据
 */
export function initAllData(data) {
    return fetch({
        url: '/api/electionservice/medRuleRef/initData',
        method: 'post',
        data: data
    });
}

/**
 * 移除
 */
export function removeCourse(data) {
    return fetch({
        url: '/api/electionservice/medRuleRef/remove',
        method: 'post',
        data: data
    });
}

/**
 * 全量移除
 */
export function removeAllCourse(data) {
    return fetch({
        url: '/api/electionservice/medRuleRef/removeAll',
        method: 'post',
        data: data
    });
}
